﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="netpay_convert.aspx.cs" Inherits="Customer_Profile.eCard.Settle.netpay_convert" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register src="../../mainTop.ascx" tagname="mainTop" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Customer List</title>
    <link href="/css/style.css" type="text/css" rel="stylesheet" />
    <script language="javascript" type="text/javascript" src="/js/common.js"></script>
    <script language="javascript" type="text/javascript" src="/js/CalPopUp.js"></script>
    <script language="javascript" >
        function grid_SelectionChanged(s, e) {
            s.GetSelectedFieldValues("settle_id", GetSelectedFieldValuesCallback);
        }

        function GetSelectedFieldValuesCallback(values) {
            var convert_settleid = "";
            try {
                for (var i = 0; i < values.length; i++) {
                    convert_settleid += values[i] + ","
                }
            } finally {
            }

            var settleidlist = document.getElementById("hidSettleid");
            settleidlist.value = convert_settleid;
        }

        function convret_check() {           
            var hidsettleidlist = document.getElementById("hidSettleid");
            var settleidlist = hidsettleidlist.value;
            if (settleidlist == '') {
                alert("请至少选择一条数据进行转换");
                return false;
            }
            else {
                //alert(settleidlist);                
                return true;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
          <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr>
                <td width="1" background="/images/dot_vline.gif">
                    <img height="1" src="/images/spacer.gif" width="1"></td>
                <td valign="top" width="15">
                    <img height="1" src="/images/spacer.gif" width="15"></td>
                <td id="TD1" valign="top" runat="server">
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td>
                                <img height="5" src="/images/spacer.gif" width="1"></td>
                        </tr>
                        <tr>
                            <td height="23">
                                <span class="navi-blk">
                                <uc1:mainTop ID="mainTop1" runat="server" />
                                    个人旅行卡->网络支付拆单</span>
                            </td>
                        </tr>
                        <tr>
                            <td background="/images/dot_hline.gif">
                                <img height="1" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td>
                                <img height="8" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>
                   <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td>
                                <table bordercolor="#c2d2e2" cellspacing="0" cellpadding="2" width="100%" border="1">
                                    <tr>
                                        <td align="right">
                                            金额：                                            
                                        </td>
                                        <td>
                                            从
                                            <asp:TextBox ID="txtStartAmount" runat="server" CssClass="input2" Text=""></asp:TextBox>
                                            到
                                            <asp:TextBox ID="txtEndAmount" runat="server" CssClass="input2" Text=""></asp:TextBox>                                            
                                            <asp:HiddenField ID="hidSettleid" runat="server" />                    
                                        </td>
                                        <td align="right">
                                            安排付款日：
                                        </td>
                                        <td>
                                            从&nbsp;&nbsp;
                                            <asp:TextBox ID="txtcreatedatebegin" runat="server" CssClass="input2" Width="120px"></asp:TextBox>&nbsp;
                                            <img style="cursor: hand" onclick="JavaScript:calPopForCMon(txtcreatedatebegin, 'ss');"
                                                height="14" src="/images/dot_date.gif" width="16" align="absMiddle">
                                            &nbsp;&nbsp;到&nbsp;&nbsp;
                                            <asp:TextBox ID="txtcreatedateend" runat="server" CssClass="input2" Width="120px"></asp:TextBox>&nbsp;
                                            <img style="cursor: hand" onclick="JavaScript:calPopForCMon(txtcreatedateend, 'ss');"
                                                height="14" src="/images/dot_date.gif" width="16" align="absMiddle">
                                        </td>
                                        <td>
                                            <asp:Button ID="btnSearch" runat="server" Text="查找" onclick="btnSearch_Click" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan=5>
                                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                <tr>
                                                    <td bgcolor="#1765a7">
                                                        <img height="11" src="/images/pic_results.gif" width="61"></td>
                                                </tr>
                                            </table>
                                            <dx:ASPxGridView ID="gridConvert" runat="server" KeyFieldName="settle_id" Width="100%" CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue">
                                                <SettingsPager PageSize="15">
                                                </SettingsPager>
                                                <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                                                    <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                                                    </LoadingPanelOnStatusBar>
                                                    <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                                                    </LoadingPanel>
                                                </Images>
                                                <ImagesFilterControl>
                                                    <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                                                    </LoadingPanel>
                                                </ImagesFilterControl>
                                                <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue">
                                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                    </Header>
                                                    <LoadingPanel ImageSpacing="10px">
                                                    </LoadingPanel>
                                                </Styles>
                                                <StylesEditors>
                                                    <ProgressBar Height="25px">
                                                    </ProgressBar>
                                                </StylesEditors>
                                                <Columns>
                                                    <dx:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0">
                                                        <HeaderTemplate>
                                                            <input type="checkbox" onclick="gridConvert.SelectAllRowsOnPage(this.checked);" title="Select/Unselect all rows on the page" />
                                                        </HeaderTemplate>
                                                        <HeaderStyle HorizontalAlign="Center" />
                                                    </dx:GridViewCommandColumn>
                                                    <dx:GridViewDataColumn FieldName="settle_id" VisibleIndex="1" Caption="结算号" />
                                                    <dx:GridViewDataColumn FieldName="deal_no" VisibleIndex="2" Caption="交易号" />
                                                    <dx:GridViewDataColumn FieldName="card_no" VisibleIndex="3" Caption="卡号" />
                                                    <dx:GridViewDataColumn FieldName="cparty_name" VisibleIndex="4" Caption="客户名称" />
                                                    <dx:GridViewDataColumn FieldName="procduct_name" VisibleIndex="5" Caption="产品名称" />
                                                    <dx:GridViewDataColumn FieldName="value_date" VisibleIndex="6" Caption="起息日" />
                                                    <dx:GridViewDataColumn FieldName="due_date" VisibleIndex="7" Caption="到期日" />
                                                    <dx:GridViewDataColumn FieldName="initial_amount" VisibleIndex="8" Caption="购买金额" />
                                                    <dx:GridViewDataColumn FieldName="due_amount" VisibleIndex="9" Caption="到期金额" />
                                                    <dx:GridViewDataColumn FieldName="settle_fee" VisibleIndex="10" Caption="手续费" />
                                                    <dx:GridViewDataColumn FieldName="pay_amount" VisibleIndex="11" Caption="支付金额" />
                                                    <dx:GridViewDataColumn FieldName="settle_status" VisibleIndex="12" Caption="状态" />
                                                </Columns>
                                                <ClientSideEvents SelectionChanged="grid_SelectionChanged" />
                                            </dx:ASPxGridView>
                                        </td>
                                    </tr>
                                    <tr>
                                        <%--<td align="right">
                                            转换标题：
                                        </td>
                                        <td align="left">
                                           <asp:TextBox ID="txtConvertTitle" runat="server" Text=""></asp:TextBox>
                                        </td>--%>
                                        <td colspan="5" align="center">
                                            <asp:Button ID="btnConvert" runat="server" Text="转换" OnClientClick="return convret_check();" onclick="btnConvert_Click" />
                                            <asp:Label ID="lblDownLoad" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">提示：</td>
                                        <td colspan="4">
                                            <asp:Label ID="lblWarning" runat="server" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
                <td valign="top" width="10"><img height="1" src="/images/spacer.gif" width="10"></td>
            </tr> 
        </table> 
    </div>
    </form>
</body>
</html>